#ifndef CREATORSTRATEGY_H
#define CREATORSTRATEGY_H

#pragma once

#include "../../ToolkitLayer.h"
#include <LDF/VisComponentStrategy.h>

class VisComponentGL;


/**
 * This strategy defines a button that when pressed creates a
 * VisComponent object. The creation process (i. e., instantiating the
 * component and adding strategies) must be done by the subclasses.
 *
 * @author Fabricio Anastacio - fabriciocfa@yahoo.com
 * @since August 28, 2007
 */
class TOOLKITLAYER_API CreatorStrategy : public VisComponentStrategy
{
	// Attributes
protected:

	// Methods
public:
	/**
	 * Constructs a creator strategy.
	 */
	CreatorStrategy(void);
	/**
	 * Destroys this strategy.
	 */
	~CreatorStrategy(void);


protected:
	/**
	 * Handles the given event.
	 *
	 * @param evt the event to be handled.
	 */
	void onEvent(LargeDisplayEvent* evt);
	
	/**
	 * Returns a pointer to the created component.
	 *
	 * @param x the x-coordinate of the creator button pressing in screen space
	 * @param y the y-coordinate of the creator button pressing in screen space
	 * @param z the z-coordinate of the creator button pressing in screen space
	 * @return a pointer to the created component.
	 */
	virtual VisComponentGL* createComponent(unsigned int x = 0, unsigned int y = 0, unsigned int z = 0) = 0;
};

#endif // CREATORSTRATEGY_H
